cmake_minimum_required(VERSION 3.10)

### 设置交叉编译工具（一定要在project之前设置！！！）
include(CMakeForceCompiler)
# 设置交叉编译器的位置
set(CMAKE_C_COMPILER "C:/cross_compilers/aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc.exe")
set(CMAKE_CXX_COMPILER "C:/cross_compilers/aarch64-linux-gnu/bin/aarch64-linux-gnu-c++.exe")
# set(CMAKE_LINKER "C:/cross_compilers/aarch64-linux-gnu/bin/aarch64-linux-gnu-ld.exe")
set(CMAKE_FIND_ROOT_PATH "C:/cross_compilers/aarch64-linux-gnu/aarch64-linux-gnu")
# 指定目标系统的类型
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

project(HelloWorld)

add_executable(${PROJECT_NAME} helloworld.cpp)



